import 'package:flutter/material.dart';

class SplashPageLoading  extends StatefulWidget {
  const SplashPageLoading () : super();

  @override
  _SplashPageLoadingState createState() => _SplashPageLoadingState();
}
class _SplashPageLoadingState extends State<SplashPageLoading> {

  @override
  void initState() {
    super.initState();

    new Future.delayed(Duration(seconds: 2),(){
      //3秒后跳转到其他路由
      Navigator.pop(context);
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body:  ConstrainedBox(
          child:Image(
            image: AssetImage("images/splash.png"),
            fit: BoxFit.cover,
            alignment: Alignment.center,
          ),
          constraints: new BoxConstraints.expand(),
        )
    );
  }
}